package com.red.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.red.dto.HomePageQueryDTO;
import com.red.dto.ProductsDTO;
import com.red.entity.Category;
import com.red.entity.Products;
import com.red.result.PageResult;

import java.util.List;


public interface ProductsService extends IService<Products> {
    PageResult pageQuery(HomePageQueryDTO dto);

    void buyProduct(List<Long> ids);

    void buyOne(Long id);

    Products selectById(Long id);

    void insert(Products products);

    void deleteByIds(List<Long> ids);

    void updateProducts(ProductsDTO dto);

    List<Category> selectList();

    void updateCategory(Category category);

    void deleteCategoryByIds(List<Long> ids);

    void insrtCategory(Category category);

    List<Products> selectAll();

    List<Products> selectByCategoryId(Long id);
}
